package com.ssy.lingxi.system.controller;

import com.ssy.lingxi.common.response.PageData;
import com.ssy.lingxi.common.response.PageModel;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.system.dto.request.MemberEquitiesUseUpdateRequest;
import com.ssy.lingxi.system.dto.response.MemberEquitiesUseResponse;
import com.ssy.lingxi.system.service.MemberEquitiesUseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
/**
 * @menu 会员设置-会员权益使用设置管理
 * @author wrc
 * @date 2020/7/20
 */
@Api(tags = "会员权益使用设置管理")
@RestController
public class MemberEquitiesUseController {

    @Autowired
    MemberEquitiesUseService memberEquitiesList;


    @ApiOperation(value = "会员权益使用设置列表")
    @GetMapping("/member/equities/use/list")
    public Wrapper<PageData<MemberEquitiesUseResponse>> memberEquitiesUseList(PageModel request) {
        return memberEquitiesList.memberEquitiesUseList(request);
    }

    @ApiOperation(value = "会员权益使用设置启用和停止")
    @PostMapping("/member/equities/use/update")
    public Wrapper memberEquitiesUseUpdate(@RequestBody MemberEquitiesUseUpdateRequest request) {
        return memberEquitiesList.memberEquitiesUseUpdate(request);
    }


}
